import 'package:common/db/lara_press_keydb.dart';
import 'package:common/lara_press_logs.dart';

class LaraPressCommon {
  static LaraPressKeyDB? _keyDb;
  static LaraPressKeyDB get keyDb => _keyDb!;

  static Future<void> init() async {
    try {
      _keyDb = await LaraPressKeyDB.getInstance();
      LaraPressLogs.getInstance().info(
        '✅LaraPressCommon init success',
        tag: 'LaraPressCommon',
      );
    } catch (e) {
      LaraPressLogs.getInstance().error(
        'init error: $e',
        tag: 'LaraPressCommon',
      );
    }
  }

  // 检测某个模块是否安装
  static bool isModuleInstalled(String moduleName) {
    return true;
  }
}
